<link href="<?php echo DOMAIN; ?>/css/my-style.css" rel="stylesheet" type="text/css" />



<?php 
	if($this->success){
	?>
		<div class="notification success" >
			<span class="strong">Thêm thành công.</span>
			<span class="close" title="Dismiss"></span>
		</div>
		<?php
	}
	
	if($this->warning == 1){
		?>
		<div class="notification warning" style="height: 20px;" >
			<span class="strong"><?php echo "<p class='meesage'>Kích thước file vượt quá giới hạn cho phép (10 MB). Xin vui lòng kiểm tra lại!</p>"; ?></span>
			<span class="close" title="Dismiss"></span>
		</div>
		<?php
	}
	
	if($this->warning == 2){
		?>
			<div class="notification warning" style="height: 20px;">
				<span class="strong"><?php echo "<p class='meesage'>Chưa chọn file hoặc định dạng file không hợp lệ. Xin vui lòng kiểm tra lại!</p>"; ?></span>
				<span class="close" title="Dismiss"></span>
			</div>
			<?php
		}
?>

<form method="post" class="form" action="" enctype="multipart/form-data">
      <fieldset>
        <legend>Thêm sinh viên</legend>
        
        <p class='row-form'>
          <label class='title-row' for="City">File excel <span class="required">*</span>:</label>
          <input style="width:250px;" id="channel" type="file" name="file"  />
        </p>
        <p class='row-form'>
        	<input class="blue" style="margin-bottom:-10px;" type="submit" name="submit" value="Thêm">
        </p>
      </fieldset>
</form>

<?php
	$s_add = $this->s_add;
	$s_edit = $this->s_edit;
	$s_error = $this->s_error;

	if(isset($s_add) || isset($s_edit) || isset($s_error)){
?>

		<div class="box-header">
          Danh sách sinh viên đã thêm vào cơ sở dữ liệu
        </div>
        <div id="dashtabs-comments" class="box-content no-padding" style="margin-bottom:10px">
        <input type="hidden" value="<?php echo DOMAIN_INDEX; ?>" id="domain"/>  
          <table class="table no-border">
            <thead>
              <tr>
               <td align="center" width="3%">STT</td>
                <td align="center" width="15%">Tên SV</td>
                <td align="center" width="8%">SHSV</td>
                <td align="center" width="15%">Lớp</td>
                <td align="center" width="8%">Khoá </td>
              </tr>
            </thead>
            <tbody>
              <?php 
                $i = 1;
              	foreach ($s_add as $key => $value) {
              		
              		?>
              		<tr <?php if($i%2) echo "class='alt'"; ?> id="<?php echo "row".$value["id"] ?>">
		                <td align="center"><?php echo $i; ?></td>
		                <td ><?php echo $value["name"] ?></td>
		                <td align="center"><?php echo $value["shsv"] ?></td>
		                <td align="center"><?php echo $value["class"] ?></td>
		                <td align="center"><?php echo $value["course"] ?></td>
		            </tr>
              		<?php
              		$i++;
              	}
              ?>
              
            </tbody>
          </table>
        </div>

        <div class="box-header">
          Danh sách sinh viên được chỉnh sửa vào cơ sở dữ liệu
        </div>
        <div id="dashtabs-comments" class="box-content no-padding" style="margin-bottom:10px">
        <input type="hidden" value="<?php echo DOMAIN_INDEX; ?>" id="domain"/>  
          <table class="table no-border">
            <thead>
              <tr>
               <td align="center" width="3%">STT</td>
                <td align="center" width="15%">Tên SV</td>
                <td align="center" width="8%">SHSV</td>
                <td align="center" width="15%">Lớp</td>
                <td align="center" width="8%">Khoá </td>
              </tr>
            </thead>
            <tbody>
              <?php 
                $i = 1;
              	foreach ($s_edit as $key => $value) {
              		
              		?>
              		<tr <?php if($i%2) echo "class='alt'"; ?> id="<?php echo "row".$value["id"] ?>">
		                <td align="center"><?php echo $i; ?></td>
		                <td ><?php echo $value["name"] ?></td>
		                <td align="center"><?php echo $value["shsv"] ?></td>
		                <td align="center"><?php echo $value["class"] ?></td>
		                <td align="center"><?php echo $value["course"] ?></td>
		            </tr>
              		<?php
              		$i++;
              	}
              ?>
              
            </tbody>
          </table>
        </div>

        <div class="box-header" >
          Danh sách sinh viên chưa thêm vào cơ sở dữ liệu (do thiếu dữ liệu).
        </div>
        <div id="dashtabs-comments" class="box-content no-padding">
        <input type="hidden" value="<?php echo DOMAIN_INDEX; ?>" id="domain"/>  
          <table class="table no-border">
            <thead>
              <tr>
               <td align="center" width="3%">STT</td>
                <td align="center" width="15%">Tên SV</td>
                <td align="center" width="8%">SHSV</td>
                <td align="center" width="15%">Lớp</td>
                <td align="center" width="8%">Khoá </td>
              </tr>
            </thead>
            <tbody>
              <?php 
                $i = 1;
              	foreach ($s_error as $key => $value) {
              		
              		?>
              		<tr <?php if($i%2) echo "class='alt'"; ?> id="<?php echo "row".$value["id"] ?>">
		                <td align="center"><?php echo $i; ?></td>
		                <td ><?php echo $value["name"] ?></td>
		                <td align="center"><?php echo $value["shsv"] ?></td>
		                <td align="center"><?php echo $value["class"] ?></td>
		                <td align="center"><?php echo $value["course"] ?></td>
		            </tr>
              		<?php
              		$i++;
              	}
              ?>
              
            </tbody>
          </table>
        </div>

        <?php } ?>